<template>
  <HeadContainer class="mine-legal-dmca" :title="'DMCA'" @back="back">
    <div class="gap-col-8 dmca-list">
      <div class="font-size-14 font-weight-500 line-height-135">{{ i18n.dmca?.info.title }}</div>
      <div class="font-size-12 font-weight-400 line-height-135">{{ i18n.dmca?.info.content }}</div>
      <div class="font-size-14 font-weight-500 line-height-135 pt-2">{{ i18n.dmca?.notice.title }}</div>
      <div class="font-size-12 font-weight-400 line-height-135">{{ i18n.dmca?.notice.content }}</div>
      <div class="font-size-14 font-weight-500 line-height-135 pt-2">{{ i18n.dmca?.contact.title }}</div>
      <div class="font-size-12 font-weight-400 line-height-135">{{ i18n.dmca?.contact.content }}</div>
      <div class="font-size-14 font-weight-500 line-height-135 pt-2">{{ i18n.dmca?.procedure.title }}</div>
      <div class="font-size-12 font-weight-400 line-height-135">{{ i18n.dmca?.procedure.content }}</div>
      <div class="font-size-14 font-weight-500 line-height-135 pt-2">{{ i18n.dmca?.counterNotification.title }}</div>
      <div class="font-size-12 font-weight-400 line-height-135">{{ i18n.dmca?.counterNotification.content }}</div>
      <div class="font-size-14 font-weight-500 line-height-135 pt-2">{{ i18n.dmca?.infringer.title }}</div>
      <div class="font-size-12 font-weight-400 line-height-135">{{ i18n.dmca?.infringer.content }}</div>
      <div class="font-size-14 font-weight-500 line-height-135 pt-2">{{ i18n.dmca?.modifications.title }}</div>
      <div class="font-size-12 font-weight-400 line-height-135">{{ i18n.dmca?.modifications.content }}</div>
      <div class="font-size-14 font-weight-500 line-height-135 pt-2">{{ i18n.dmca?.requests.title }}</div>
      <div class="font-size-12 font-weight-400 line-height-135">{{ i18n.dmca?.requests.content }}</div>
      <div class="font-size-14 font-weight-500 line-height-135 pt-2">{{ i18n.dmca?.language.title }}</div>
      <div class="font-size-12 font-weight-400 line-height-135">{{ i18n.dmca?.language.content }}</div>
      <div class="font-size-12 font-weight-400 line-height-135 pt-2">{{ i18n.dmca?.final }}</div>
      <div class="font-size-12 font-weight-400 line-height-135 pt-2">{{ i18n.dmca?.fantasi }}</div>
    </div>
  </HeadContainer>
  <Jsonld :schema="schema"></Jsonld>
</template>

<script setup>
import { ref, shallowRef } from 'vue'
import { useRouter } from 'vue-router'
import Jsonld from '@/components/common/Jsonld.vue'
import HeadContainer from '@/components/layout/HeadContainer.vue'
import { useI18nPack } from '@/compositions/request/i18nPack'

const router = useRouter()
const i18n = useI18nPack('dmca')
const emits = defineEmits(['toPage'])
const prevPath = ref(window.history.state.back)

function back() {
  if (prevPath.value && !prevPath.value?.includes('mine')) {
    router.push({
      path: prevPath.value,
    })
  } else {
    emits('toPage', 2, 'legal')
    router.replace({ name: 'mine', params: { to: 'legal' } })
  }
}

// Jsonld 佈置
const schema = shallowRef({
  '@context': 'https://schema.org',
  '@type': 'WebSite',
  name: 'Fantasi',
  url: 'https://www.fantasi.one/mine/legal/dmca',
})
</script>
